package com.itheima.Service.impl;

import com.itheima.Service.BookService;
import com.itheima.dao.BookDao;
import com.itheima.dao.impl.BookDaoimpl;

public class BookServiceimpl implements BookService {
    //第一步，删除new创建对象的代码
    private BookDaoimpl bookdao;

    @Override
    public void save() {
        System.out.println("我是BookService的实现");
    }
    //【第二步】提供依赖对象对应的set方法
    public void setBookdao(BookDao bookdao){
        this.bookdao= (BookDaoimpl) bookdao;
    }
}
